LAYER 3 — RESOURCE & EXCLUSION CONSTRAINTS
Source: Layer 0 (object inventory, los table, visibility table)
        Layer 1 (beam crossing tables, chain interference tables)
        Layer 2 (required chains, gate1 closed, chain topology constraints)

Purpose: Apply resource counting, pigeonhole reasoning, area exclusion, and
color exclusion to determine which configurations are feasible. Resolve the
2-hop viability question deferred from Layer 2. Build elimination matrices.

Inputs: Layer 0 §1, §6, §7; Layer 1 §2–§4, P1.1–P1.12;
        Layer 2 §2, §4, §5, P2.1–P2.8

Outputs: Complete 2-hop viability analysis, location elimination matrix,
candidate goal configurations, identification of remaining unknowns.


========================================================================
1. 2-HOP VIABILITY ANALYSIS
========================================================================

Layer 2 §5d identified two candidate 2-hop structures, each routing one
chain through area4 using 2 connectors while the other chain uses the
remaining connector as a 1-hop chain. Both require gate1 closed (P2.4).

Constraints on the relay connector in a 2-hop chain through area4:
  - Must have los0 to its transmitter (gate1 closed, so los1 is blocked).
  - Must have visibility to area4. From Layer 0 §7:
      area1→area4: vis1(gate1) — blocked when gate1 closed. NOT VIABLE.
      area2→area4: vis0. VIABLE.
      area3→area4: vis0. VIABLE.
  - Must not share an area with the other chain's 1-hop connector
    (one engaged connector per area).

1a. Red 2-hop to receiver2.

  Structure: transmitter1 → relay_in_east → connector_in_area4 → receiver2
  Remaining blue chain: 1-hop, transmitter2 → connector → receiver3
  Blue 1-hop viable areas: area2, area3 (Layer 2 §5a).

  Case R2a: Red relay in area2, red terminal in area4, blue 1-hop in area3.
    Red segments: T1→area2, area2→area4, area4→R2.
    Blue segments: T2→area3, area3→R3.
    
    T1→area2 vs T2→area3: YES (Layer 1 §2). INTERFERES.

  Case R2b: Red relay in area3, red terminal in area4, blue 1-hop in area2.
    Red segments: T1→area3, area3→area4, area4→R2.
    Blue segments: T2→area2, area2→R3.

    T1→area3 vs T2→area2: NO (Layer 1 §2). ✓
    T1→area3 vs area2→R3: NO (Layer 1 §3c, s=-0.14). ✓
    area3→area4 vs T2→area2: (10,9)→(7,8) vs (10,0.1)→(9,8).
      s = 3t, 8.9 = 24.7t, t = 0.360, s = 1.081. s > 1, outside. NO. ✓
    area3→area4 vs area2→R3: (10,9)→(7,8) vs (9,8)→(1,10.9).
      3t - 8s = -1, t + 2.9s = 1. t = 1-2.9s, 3(1-2.9s)-8s = -1,
      3-8.7s-8s = -1, 16.7s = 4, s = 0.240, t = 0.304.
      Both in (0,1). YES. INTERFERES.

  Both cases interfere. Red 2-hop to receiver2 is NOT VIABLE.

1b. Blue 2-hop to receiver3.

  Structure: transmitter2 → relay_in_east → connector_in_area4 → receiver3
  Remaining red chain: 1-hop, transmitter1 → connector → receiver2
  Red 1-hop viable areas: area2, area3 (Layer 2 §5a).

  Case B3a: Blue relay in area2, blue terminal in area4, red 1-hop in area3.
    Blue segments: T2→area2, area2→area4, area4→R3.
    Red segments: T1→area3, area3→R2.

    T1→area3 vs T2→area2: NO (Layer 1 §2). ✓
    T1→area3 vs area2→area4: (11,0.1)→(10,9) vs (9,8)→(7,8).
      8.9t = 7.9, t = 0.888, s = (0.888-2)/2 = -0.556. s < 0. NO. ✓
    T1→area3 vs area4→R3: NO (Layer 1 §3c, s=-0.55). ✓
    area3→R2 vs T2→area2: NO (Layer 1 §3c, s=1.22). ✓
    area3→R2 vs area2→area4: (10,9)→(7,10.9) vs (9,8)→(7,8).
      1.9t = -1, t = -0.526. t < 0. NO. ✓
    area3→R2 vs area4→R3: (10,9)→(7,10.9) vs (7,8)→(1,10.9).
      t - 2s = 1, 1.9(1+2s) - 2.9s = -1, 0.9s = -2.9, s = -3.22.
      s < 0. NO. ✓

    ALL SIX pair checks pass. CLEAR. ✓

  Case B3b: Blue relay in area3, blue terminal in area4, red 1-hop in area2.
    Blue segments: T2→area3, area3→area4, area4→R3.
    Red segments: T1→area2, area2→R2.

    T1→area2 vs T2→area3: YES (Layer 1 §2, 0.50, 0.44). INTERFERES.

  Case B3c: Blue relay in area2, blue terminal in area4, red 1-hop in area2.
    EXCLUDED — relay and red connector would share area2.

  Case B3d: Blue relay in area3, blue terminal in area4, red 1-hop in area3.
    EXCLUDED — relay and red connector would share area3.

  One viable case: B3a — blue relay in area2, blue terminal in area4,
  red 1-hop in area3. All 3 connectors are committed to chains.

1c. Summary.

  Two candidate goal configurations survive:

  Config I (both chains 1-hop, 2 connectors committed):
    Red connector in area3, paired with transmitter1 and receiver2.
    Blue connector in area2, paired with transmitter2 and receiver3.
    Third connector: uncommitted (location and state TBD).

  Config II (blue 2-hop, 3 connectors committed):
    Red connector in area3, paired with transmitter1 and receiver2.
    Blue relay in area2, paired with transmitter2 and area4 connector.
    Blue terminal in area4, paired with area2 connector and receiver3.
    No connector uncommitted.

  Both configs place a red connector in area3 and a blue connector in
  area2. They differ only in whether a third connector participates in
  a 2-hop blue chain through area4.


========================================================================
2. LOCATION ELIMINATION MATRIX (partial)
========================================================================

Columns: area1, area2, area3, area4, held
Rows: connector roles (not yet identified with specific connectors)

Constraints applied:
  P1.5: area1 cannot serve receiver2 or receiver3 → no chain connector
        in area1.
  P2.5: area4 cannot directly pair with a transmitter → area4 only viable
        as 2-hop terminal (Config II).
  P2.7: If both chains are 1-hop, red must be in area3, blue in area2.
  §1:   If blue is 2-hop, relay is in area2, terminal in area4, red in area3.

Both configs agree on the following:
  - One connector is in area3 with derived color red.
  - One connector is in area2 with derived color blue.
  - No chain connector is in area1.

Third connector possibilities:
  Config I:  not in area3 (occupied), not in area2 (occupied). Could be
             in area1, area4, or held. If in area4, it is not engaged
             (no transmitter los, so no chain). If in area1, not engaged.
  Config II: in area4, engaged as blue chain terminal.

Location matrix (✓ = possible, ✗ = eliminated):

  Role           area1    area2    area3    area4    held
  ─────────────────────────────────────────────────────────
  Red (→R2)      ✗(P1.5)  ✗(§1c)  ✓        ✗(P2.5)  ✗
  Blue (→R3)     ✗(P1.5)  ✓        ✗(§1c)  ✗/✓      ✗
  Third          ✗/?      ✗(occ)  ✗(occ)   ✓/?      ✓/?

  Note: The Blue row shows ✗/✓ for area4 because area4 is viable only
  in Config II (as a 2-hop terminal). The Third row depends on which
  config applies.


========================================================================
3. AREA EXCLUSION CONSTRAINT
========================================================================

Rule: Only one engaged connector may occupy a given area at a time.
(An engaged connector is one participating in an active beam chain.)

In both configs, area2 and area3 each have exactly one engaged connector.
No exclusion conflict arises.

In Config II, area4 has one engaged connector (the blue terminal). An
uncommitted connector in area4 would not be engaged and therefore would
not violate this constraint — but Config II has no uncommitted connector.

In Config I, if the third connector is placed in area2 or area3, it would
coexist with an engaged connector. This is allowed only if the third
connector is not itself engaged. Since it is uncommitted (no pairings in
either chain), it is not engaged. However, its physical presence in the
area could occlude beams passing through that area. Whether this causes
interference depends on the specific beam geometry and is not resolved
by the area exclusion rule alone.


========================================================================
4. PAIRING CONSTRAINTS
========================================================================

4a. Config I pairings (both 1-hop):
  Red connector:  (paired red-conn transmitter1), (paired red-conn receiver2)
  Blue connector: (paired blue-conn transmitter2), (paired blue-conn receiver3)
  Third connector: no pairings.

  Each chain connector pairs with exactly one transmitter and one receiver.
  With only 2 connectors per chain and no intermediate relays, these are
  the unique pairings.

4b. Config II pairings (blue 2-hop):
  Red connector:  (paired red-conn transmitter1), (paired red-conn receiver2)
  Blue relay:     (paired blue-relay transmitter2), (paired blue-relay blue-term)
  Blue terminal:  (paired blue-term blue-relay), (paired blue-term receiver3)

  The blue relay pairs upstream with transmitter2 and downstream with the
  blue terminal. The blue terminal pairs upstream with the relay and
  downstream with receiver3. All 3 connectors are fully committed.


========================================================================
5. COLOR ASSIGNMENT CONSTRAINTS
========================================================================

In both configs:
  - The connector in area3 acquires color red (from transmitter1 chain).
  - The connector in area2 acquires color blue (from transmitter2 chain).

In Config II additionally:
  - The connector in area4 acquires color blue (relayed from area2 connector).


========================================================================
6. CONNECTOR IDENTITY
========================================================================

The analysis so far determines which roles exist (red chain connector,
blue chain connector, possibly blue terminal) and where they are located,
but not which physical connector (connector1, connector2, connector3)
fills which role.

Connector identity depends on the action sequence that placed them —
which connector was picked up from where, moved where, and connected.
This is temporal reasoning, deferred to Layer 4.

What can be said from resource constraints alone:
  - Three connectors, at least two distinct locations (area2, area3).
  - In Config I, one connector is not in area2 or area3.
  - In Config II, all three connectors are in distinct areas (area2,
    area3, area4).


========================================================================
7. REMAINING UNKNOWNS
========================================================================

The following questions cannot be resolved by static resource and
exclusion constraints alone:

  U1. Does the goal state include a held connector?
      If yes: Config II is eliminated (all connectors placed), and the
      held connector is the uncommitted third of Config I.
      If no: Config I requires the third connector to be placed somewhere
      (area1 or area4, not engaged), and Config II remains viable.

  U2. Which physical connector fills which role?
      Requires temporal reasoning about the action sequence.

  U3. In Config I, where is the third connector?
      If held: resolved by U1. If placed: must not occlude active beams.

These unknowns are deferred to Layer 4 (temporal/causal reasoning).


========================================================================
8. OUTPUT PROPOSITIONS
========================================================================

P3.1  Red 2-hop to receiver2 is not viable. Both candidate relay
      placements (area2, area3) produce beam interference with the
      remaining blue 1-hop chain.

P3.2  Blue 2-hop to receiver3 has exactly one viable configuration:
      blue relay in area2, blue terminal in area4, red 1-hop in area3.
      (Case B3a, verified against all six beam segment pair checks.)

P3.3  Two candidate goal configurations survive:
      Config I:  Red in area3 (1-hop→R2), Blue in area2 (1-hop→R3),
                 third connector uncommitted.
      Config II: Red in area3 (1-hop→R2), Blue relay in area2,
                 Blue terminal in area4 (2-hop→R3), all committed.

P3.4  Both configs require: a red connector in area3 and a blue connector
      in area2. These are invariant across all viable configurations.

P3.5  Config I leaves one connector uncommitted. Config II commits all
      three. If a held connector is required in the goal state, only
      Config I is viable.

P3.6  Connector identity (which physical connector fills which role)
      cannot be determined from static constraints alone and requires
      temporal reasoning.
